using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
using WozLib.UI.Ink;
using System.Diagnostics;

namespace WozLib.WozCommands
{
  public class SelectToolWozCommand : WozCommand
  {
    [XmlAttribute("PreviousTool")]
    public SketchPad.InkTools PreviousTool
    {
      get
      {
        return _PreviousTool;
      }
      set
      {
        _PreviousTool = value;
      }
    } SketchPad.InkTools _PreviousTool;

    [XmlAttribute("NewTool")]
    public SketchPad.InkTools NewTool
    {
      get
      {
        return _NewTool;
      }
      set
      {
        _NewTool = value;
      }
    } SketchPad.InkTools _NewTool;


    public SelectToolWozCommand()
    {
    }

    public SelectToolWozCommand(SketchPad.InkTools previousTool, SketchPad.InkTools newTool)
    {
      PreviousTool = previousTool;
      NewTool = newTool;
    }

    public override void Undo()
    {
      SketchPad.CurrentInkTool = PreviousTool;
    }

    public override void Redo()
    {
      SketchPad.CurrentInkTool = NewTool;
    }
  }
}
